home *** CD-ROM | disk | FTP | other *** search
Text File | 1994-11-12 | 2.3 KB | 109 lines | [TEXT/EMAC] |
- ! InterSLIP dial script for Hayes compatible modems and The Internet Adapter
-
- ! Original script by Fred Morris
- ! Modifications by Adam C. Engst, Paul Ediger
- ! Modified for The Internet Adapter (TIA) by Bill Arnett
- ! other users may have to modify the lines marked with "<-------- "
-
- @originate
- ! Initialize modem from string in InterSLIP configuration
- note "Initializing modem"
- write "^4\13"
- pause 10
- ! Set speaker mode
- write "ATM^2\13"
- pause 10
- SetTries 0
-
- @label 8
- ! Dial modem from number and tone/pulse option in InterSLIP configuration
- note "Dialing ^1"
- write "ATDT^3^1\13"
- pause 30 ! just so he can see the phone #
-
- ! Check only for BUSY or CONNECT
- matchstr 1 10 "BUSY"
- matchstr 2 20 "CONNECT"
- note "Waiting for CONNECT"
- matchread 500
-
- @label 10
- ! got BUSY or no response
- IncTries
- IfTries 99 15 ! <-------- try 99 times before asking user
-
- ! hang up and reinitialize modem from string in InterSLIP configuration
- note "Reinitializing modem"
- pause 30
- write "+++"
- pause 60
- write "ATH\13"
- pause 30
- write "^4\13"
- jump 8
-
- @label 15
- ! ask the user if he wants to continue dialing
- ask 0 "enter anything to stop"
- SetTries 0
- ifstr 1 8 "^*^1"
-
- ! he wants to stop
- SetTries 123 ! indicate that dialing failed
- exit -1
-
- @label 20
- ! got CONNECT, indicate success and proceed to the Gateway script
- exit 0
-
-
- @hangup
- pause 10
- IfTries 123 99
- pause 10
- IfTries 124 50
-
- pause 1
- note "Terminating TIA"
- write "\03\03\03" ! <-------- intr character
- pause 21
- write "\03\03" ! <-------- intr character
- matchclr
- SetTries 124 ! indicate that we've killed it
- note "Waiting for TIA to die"
-
- ! if we ran TIA under the shell then we should get another shell prompt;
- ! if we exec'ed it then the modem should hang up
- matchstr 1 30 "% " ! <-------- shell prompt
- matchstr 2 98 "NO CARRIER"
- matchread 400
- ! if we fail to kill TIA, just drop the line anyway
- jump 50
-
- @label 30
- ! issue logout command to logout normally
- note "Logging out"
- write "logout\13" ! <-------- logout command
- matchclr
- ! the modem should notice that the host dropped the line
- matchstr 1 98 "NO CARRIER"
- matchread 400
- ! if the host doesn't drop the line, we hang up locally
-
- @label 50
- ! Hang up the modem
- note "Hanging up modem"
- write "+++"
- pause 60
- write "ATH\13"
-
- @label 98
- ! Reinitialize the modem from string in InterSLIP configuration
- write "^4\13"
-
- @label 99
- ! we're outta here!
- note "Off"
- SetTries 0
- exit 0
-